/*
 * ListaNodo.java
 *
 * Created on 6 de agosto de 2012, 04:49 PM
 */

package vista;
import controlador.*;

/**
 *
 * @author  Jesus Vasquez
 */
public class AtributosNodo extends javax.swing.JFrame {
    
    ControladorAtributosNodo controladorAtributosNodo;
    
    /** Creates new form ListaNodo */
    public AtributosNodo() {
        initComponents();
        controladorAtributosNodo = new ControladorAtributosNodo();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        panel = new javax.swing.JLayeredPane();
        buttonGuardar = new javax.swing.JButton();
        buttonCancelar = new javax.swing.JButton();
        labelDireccion = new javax.swing.JLabel();
        textDireccion = new javax.swing.JTextField();
        buttonDispositivo = new javax.swing.JButton();
        textPosX = new javax.swing.JTextField();
        labelPosX = new javax.swing.JLabel();
        textPosY = new javax.swing.JTextField();
        labelPosY = new javax.swing.JLabel();
        textPosZ = new javax.swing.JTextField();
        labelPosZ = new javax.swing.JLabel();
        textUbicacion = new javax.swing.JTextField();
        labelUbicacion = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        buttonGuardar.setText("Guardar");
        buttonGuardar.setBounds(400, 350, 80, 23);
        panel.add(buttonGuardar, javax.swing.JLayeredPane.DEFAULT_LAYER);

        buttonCancelar.setText("Cancelar");
        buttonCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonCancelarActionPerformed(evt);
            }
        });

        buttonCancelar.setBounds(500, 350, 75, 23);
        panel.add(buttonCancelar, javax.swing.JLayeredPane.DEFAULT_LAYER);

        labelDireccion.setText("Direccion:");
        labelDireccion.setBounds(50, 80, 70, 14);
        panel.add(labelDireccion, javax.swing.JLayeredPane.DEFAULT_LAYER);

        textDireccion.setEditable(false);
        textDireccion.setBounds(130, 80, 200, 19);
        panel.add(textDireccion, javax.swing.JLayeredPane.DEFAULT_LAYER);

        buttonDispositivo.setText("Modificar");
        buttonDispositivo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonDispositivoActionPerformed(evt);
            }
        });

        buttonDispositivo.setBounds(400, 80, 80, 23);
        panel.add(buttonDispositivo, javax.swing.JLayeredPane.DEFAULT_LAYER);

        textPosX.setEditable(false);
        textPosX.setBounds(130, 120, 200, 19);
        panel.add(textPosX, javax.swing.JLayeredPane.DEFAULT_LAYER);

        labelPosX.setText("Posici\u00f3n X:");
        labelPosX.setBounds(50, 120, 70, 14);
        panel.add(labelPosX, javax.swing.JLayeredPane.DEFAULT_LAYER);

        textPosY.setEditable(false);
        textPosY.setBounds(130, 160, 200, 19);
        panel.add(textPosY, javax.swing.JLayeredPane.DEFAULT_LAYER);

        labelPosY.setText("Posici\u00f3n Y:");
        labelPosY.setBounds(50, 160, 70, 14);
        panel.add(labelPosY, javax.swing.JLayeredPane.DEFAULT_LAYER);

        textPosZ.setEditable(false);
        textPosZ.setBounds(130, 200, 200, 19);
        panel.add(textPosZ, javax.swing.JLayeredPane.DEFAULT_LAYER);

        labelPosZ.setText("Posici\u00f3n Z:");
        labelPosZ.setBounds(50, 200, 60, 14);
        panel.add(labelPosZ, javax.swing.JLayeredPane.DEFAULT_LAYER);

        textUbicacion.setEditable(false);
        textUbicacion.setBounds(130, 240, 200, 19);
        panel.add(textUbicacion, javax.swing.JLayeredPane.DEFAULT_LAYER);

        labelUbicacion.setText("Ubicaci\u00f3n:");
        labelUbicacion.setBounds(50, 240, 70, 14);
        panel.add(labelUbicacion, javax.swing.JLayeredPane.DEFAULT_LAYER);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(panel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 600, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(panel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 400, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
        );
        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void buttonCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCancelarActionPerformed
        controladorAtributosNodo.RegresarAlMenuAnterior(this);
    }//GEN-LAST:event_buttonCancelarActionPerformed

    private void buttonDispositivoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonDispositivoActionPerformed
        controladorAtributosNodo.ActivarTextFields(textPosX, textPosY, textPosZ, textUbicacion);
    }//GEN-LAST:event_buttonDispositivoActionPerformed
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton buttonCancelar;
    private javax.swing.JButton buttonDispositivo;
    private javax.swing.JButton buttonGuardar;
    private javax.swing.JLabel labelDireccion;
    private javax.swing.JLabel labelPosX;
    private javax.swing.JLabel labelPosY;
    private javax.swing.JLabel labelPosZ;
    private javax.swing.JLabel labelUbicacion;
    private javax.swing.JLayeredPane panel;
    private javax.swing.JTextField textDireccion;
    private javax.swing.JTextField textPosX;
    private javax.swing.JTextField textPosY;
    private javax.swing.JTextField textPosZ;
    private javax.swing.JTextField textUbicacion;
    // End of variables declaration//GEN-END:variables

}
